
File Attachments plugin for Seditio
Version 1.0.3
This plugin tightly integrates one of the most wanted functions for Seditio Framework.

Features:
1. Attach files to pages and forum posts.
2. Does not use PFS.
3. Multiple attachments per post.
4. Size limits set in Seditio user groups configuration.
5. Thumbnails for attached images.
6. Paper clip button in topic list to show all attachments in topic.
7. Preview image in page category listing for automated showcases.
8. 100% skinnable, internationalization support.
9. Seditio permissions system used (Read/Write/Admin).
10. Verbose error output.
11. Disk/database cleanup utility.
12. A lot of customizable settings.
13. Personal attachments management.
14. Gmail-like interface support and examples.

Requirements:
1. File uploads support on in webserver configuration.
Installation:
1. Put the attach plugin into your Seditio plugins folder.
2. Log into your Admin panel and install File Attachments plugin.
3. Go to Admin => Configuration => attach and configure the plugin for your needs.
4. Make sure the directory you specified in configuration is writable for PHP.
5. Go to Admin => Tools => File Attachments and click Install to install the database table required
by plugin.
6. Edit your skin files. You can find the list of all available tags on plugin installation page
(admin.php?m=plug&a=details&pl=attach). There are example pieces of TPL files in the bundled
example_tpl folder.
7. Don't forget that all the forms in forums.editpost.tpl, forums.newtopic.tpl, forums.posts.tpl,
page.add.tpl and page.edit.tpl MUST have an attribute enctype="multipart/form-data".
8. You can also edit a popup template in plugins/attach/tpl/attach.tpl or you can create your own
template in skins/YOUR_SKIN/plugin.standalone.attach.tpl.
9. Have fun!

Update:
1.0.1-1.0.2
1. Update your plugins/attach with the files supplied.
2. Remove static value attribute from attachment caption input tag in forums.newtopic.tpl,
forums.posts.tpl and page.add.tpl. See example_tpl files.
1.0.0-1.0.1
1. Update your plugins/attach with the files supplied.
2. Go to Admin => Plugins => File Attachments and run Install.
3. Configure your plugin instance. Notice the new Enable files in user subdirectories option.
4. Modify your template files. See example_tpl and Admin => Plugins => File Attachments.
Important details:
1. You should run the Clean up tool in Admin => Tools => File Attachments from times to times,
because plugin can't automatically remove attachments when whole topics or categories are removed
(it does it when single posts or pages are removed). This tool removes attachments which belong to
posts which don't exist anymore.
2. When you edit a post, there are several options for each upload field:
0 You can change titles only (default).
0 If you want to replace an existing attachment with a new file, you should choose a file by
clicking the Browse button. Then check the Replace checkbox. In this case the previous file
will be replaced gently. If you check both Replace and Delete boxes, this will remove an
original file and add a new one, so the cache update is forced.
0 You can delete an existing attachment by checking the Delete checkbox.
0 You can add more attachments if there are vacant attachment rows left.
3. Don't forget to set single file size limit and total file space for each user group in Admin => Users =>
{Target group}.
4. Don't forget to set correct permissions in Admin => Plugins => File Attachments => Rights
(admin.php?m=rightsbyitem&ic=plug&io=attach). R means viewing and downloading files,
W means adding your own attachments, A means editing attachments owned by others.
5. The Preview image feature for list.php means that the thumbnail of the first image attached to a
page will be shown in category listing as a preview image which is good for skin shops and other
automated showcases.
Known issues:
1. If using Auto Joining Posts plugin, when the poster is the same as the previous in topic, the post
gets joined to the previous one and files are not attached. So, to attach the files in this case a poster
needs to edit the previous post instead of bumping a new one.
2. Autovalidation plugin seems to be broken with this one. So there is a complete replacement
integrated into this plugin and a configuration option to switch it on or off.
3. Some custom rewrite corehacks conflict with attachment error message transmission.
Better interface:
This plugin is 100% skinnable and customizable but still you may think that all these massive file boxes
look ugly in comparison with vBulletin or IPB windows, boxes and AJAX. In Seditio we know another fast,
easy and handy way to achieve similar goals. For example, we can make handy Gmail-like interface for our
attachment boxes. Here is a HOWTO:
1. All you need is located in example_tpl/gmail-style folder. These are just a few modifications to
the template files: no coding or corehacks needed.
2. Open gmail-style.js. You can put it to your skin folder and include this script file, or you can paste
it in <script></script> of your header.tpl. However, this script should be included in your pages as
you usually include JavaScript code in your template.
3. Modify forums.editpost.tpl, forums.newtopic.tpl, forums.posts.tpl, page.add.tpl, page.edit.tpl as
shown in example_tpl/gmail-style. Pay attention for divs and Attach file link.
Changelog:
1.0.3
? Better support for showcase preview images in list (useful for catalogues).
? Eliminated image XSS possibilities.
? Fixed a bug with custom attachment titles.
1.0.2
? A few bugfixes.
? Original filenames added as caption by default.
? Admin infotool for attachments by ID.
1.0.1
? User subfolders feature (backwards compatible).
? Anti-bump conflict fixes.
? Added Personal attachments space management, see the new tags and TPL examples. You may
add links to personal attachments in any page/template: plug.php?o=attach&uid=USER_ID.
? Improvements in attachment control and various fixes.
? Gmail-like interface support and examples.











Eklentiyi Kurdukdan sonra Temanzda Dzenleme Yapacagnz Alanlar.

Forums.posts.tpl yi an alttakini bulun 

{FORUMS_POSTS_ROW_TEXT}

altna ekleyin.

<!-- BEGIN: ROW_ATTACH -->

<!-- BEGIN: ROW_ATTACH_IMAGE -->
<a href="{ROW_ATTACH_URL}" title="{ROW_ATTACH_CAPTION} | {ROW_ATTACH_HITS} hits" target="_blank">
<img src="{ROW_ATTACH_THUMB}" alt="" /></a>
<!-- END: ROW_ATTACH_IMAGE -->

<!-- BEGIN: ROW_ATTACH_FILE -->
<br /><img src="{ROW_ATTACH_ICON}" alt="" /> <a href="{ROW_ATTACH_URL}" target="_blank">{ROW_ATTACH_CAPTION}</a> ({ROW_ATTACH_SIZE} kB, {ROW_ATTACH_HITS} downloads)
<!-- END: ROW_ATTACH_FILE -->

<!-- END: ROW_ATTACH -->

Alttakini bulun

<form action="{FORUMS_POSTS_NEWPOST_SEND}"  method="post" name="newpost">

Alttakiyle deitirin.
<form action="{FORUMS_POSTS_NEWPOST_SEND}"  method="post" name="newpost" enctype="multipart/form-data">

Alttakini bulun
<input type="submit" value="{PHP.skinlang.forumspost.Reply}">

Altna ekleyin.

<!-- BEGIN: FORUMS_ATTACH_ERROR -->
<div class="error">
{FORUMS_ATTACH_ERROR_MSG}
</div>
<!-- END: FORUMS_ATTACH_ERROR -->

<!-- BEGIN: NEWPOST_ATTACH -->

<script language="javascript" type="text/javascript">
function toggleAttach() {
	var attBox = document.getElementById("att_box");
	if(attBox.style.display == 'none') attBox.style.display = '';
	else attBox.style.display = 'none';
}
</script>

<a href="javascript:toggleAttach()">Attach files</a><br />
<div id="att_box" style="display:none">
<i>Your space: {NEWPOST_ATTACH_LEFTSPACE} of {NEWPOST_ATTACH_TOTALSPACE} kB left, files not larger than {NEWPOST_ATTACH_MAXFILESIZE} kB.</i><br />

<!-- BEGIN: NEWPOST_ATTACH_ROW -->
<input type="text" name="{NEWPOST_ATTACH_ROW_CAPTION}" />
<input type="file" name="{NEWPOST_ATTACH_ROW_FILE}" /><br />
<!-- END: NEWPOST_ATTACH_ROW -->

</div>
<!-- END: NEWPOST_ATTACH -->

forums.editpost.tpl yi an alttakini bulun
<form action="{FORUMS_EDITPOST_SEND}" method="post" name="editpost">
Alttakiyle deitirin.
<form action="{FORUMS_EDITPOST_SEND}" method="post" name="editpost" enctype="multipart/form-data">
Alttakini bulun
{FORUMS_EDITPOST_TEXTBOXER}
Altna ekleyin.
<!-- BEGIN: EDITPOST_ATTACH -->
<i>Attachments: {EDITPOST_ATTACH_LEFTSPACE} of {EDITPOST_ATTACH_TOTALSPACE} kB left, files not larger than {EDITPOST_ATTACH_MAXFILESIZE} kB.</i><br />

<!-- BEGIN: EDITPOST_ATTACH_ERROR -->
<div class="error">
{EDITPOST_ATTACH_ERROR_MSG}
</div>
<!-- END: EDITPOST_ATTACH_ERROR -->

<!-- BEGIN: EDITPOST_ATTACH_ROW -->
<input type="text" name="{EDITPOST_ATTACH_ROW_CAPTION}" value="{EDITPOST_ATTACH_ROW_CAPTION_VALUE}" />
<input type="file" name="{EDITPOST_ATTACH_ROW_FILE}" /> {EDITPOST_ATTACH_ROW_REPLACE} {EDITPOST_ATTACH_ROW_DELETE}<br />
<!-- END: EDITPOST_ATTACH_ROW -->

<!-- END: EDITPOST_ATTACH -->

forums.newtopic.tpl yi an alttakini bulun
<form action="{FORUMS_NEWTOPIC_SEND}" method="post" name="newtopic">
Alttakiyle deitirin.
<form action="{FORUMS_NEWTOPIC_SEND}" method="post" name="newtopic" enctype="multipart/form-data">
Alttakini bulun
{FORUMS_NEWTOPIC_TEXTBOXER}
Altna ekleyin.
<!-- BEGIN: NEWTOPIC_ATTACH -->
<i>Attachments: {NEWTOPIC_ATTACH_LEFTSPACE} of {NEWTOPIC_ATTACH_TOTALSPACE} kB left, files not larger than {NEWTOPIC_ATTACH_MAXFILESIZE} kB.</i><br />

<!-- BEGIN: NEWTOPIC_ATTACH_ROW -->
<input type="text" name="{NEWTOPIC_ATTACH_ROW_CAPTION}" />
<input type="file" name="{NEWTOPIC_ATTACH_ROW_FILE}" /><br />
<!-- END: NEWTOPIC_ATTACH_ROW -->

<!-- END: NEWTOPIC_ATTACH -->

forums.topics.tpl yi an alttakini bulun
<a href="{FORUMS_TOPICS_ROW_URL}">{FORUMS_TOPICS_ROW_TITLE}</a>
Alttakiyle deitirin.
{FORUMS_TOPICS_ROW_ATTACH}<a href="{FORUMS_TOPICS_ROW_URL}">{FORUMS_TOPICS_ROW_TITLE}</a>

page.tpl yi an Alttakini bulun
{PAGE_TEXT}
Altna veya stne ekleyin.
<!-- BEGIN: PAGE_ATTACH -->

<!-- BEGIN: PAGE_ATTACH_IMAGE -->
<a href="{PAGE_ATTACH_URL}" title="{PAGE_ATTACH_CAPTION} | {PAGE_ATTACH_HITS} hits" target="_blank">
<img src="{PAGE_ATTACH_THUMB}" alt="" /></a>
<!-- END: PAGE_ATTACH_IMAGE -->

<!-- BEGIN: PAGE_ATTACH_FILE -->
<br /><img src="{PAGE_ATTACH_ICON}" alt="" /> <a href="{PAGE_ATTACH_URL}" target="_blank">{PAGE_ATTACH_CAPTION}</a> ({PAGE_ATTACH_SIZE} kB, {PAGE_ATTACH_HITS} downloads)
<!-- END: PAGE_ATTACH_FILE -->

<!-- END: PAGE_ATTACH -->

list.tpl yi an alttakini bulun
<td class="centerall">{LIST_ROW_DATE}</td>
Altna ekleyin
<td>{LIST_ROW_PREVIEW}</td>

page.edit.tpl an alttakini bulun
<form action="{PAGEEDIT_FORM_SEND}" method="post" name="update">
Daitirin.
<form action="{PAGEEDIT_FORM_SEND}" method="post" name="update" enctype="multipart/form-data">
Alttakini bulun
{PAGEEDIT_FORM_TEXTBOXER}
Altna ekleyin.
<!-- BEGIN: PAGEEDIT_ATTACH -->
<b>Attach files</b><br />
<i>Your space: {PAGEEDIT_ATTACH_LEFTSPACE} of {PAGEEDIT_ATTACH_TOTALSPACE} kB left, files not larger than {PAGEEDIT_ATTACH_MAXFILESIZE} kB.</i><br />

<!-- BEGIN: PAGEEDIT_ATTACH_ERROR -->
<div class="error">
{PAGEEDIT_ATTACH_ERROR_MSG}
</div>
<!-- END: PAGEEDIT_ATTACH_ERROR -->

<!-- BEGIN: PAGEEDIT_ATTACH_ROW -->
<input type="text" name="{PAGEEDIT_ATTACH_ROW_CAPTION}" value="{PAGEEDIT_ATTACH_ROW_CAPTION_VALUE}" />
<input type="file" name="{PAGEEDIT_ATTACH_ROW_FILE}" /> {PAGEEDIT_ATTACH_ROW_REPLACE} {PAGEEDIT_ATTACH_ROW_DELETE}<br />
<!-- END: PAGEEDIT_ATTACH_ROW -->

<!-- END: PAGEEDIT_ATTACH -->

page.add.tpl an alttakini bulun
<form action="{PAGEADD_FORM_SEND}" method="post" name="newpage">
Daitirin.
<form action="{PAGEADD_FORM_SEND}" method="post" name="newpage" enctype="multipart/form-data">
Alttakini bulun
{PAGEADD_FORM_TEXTBOXER}
Altna ekleyin.
<!-- BEGIN: PAGEADD_ATTACH -->
<b>Attach files</b><br />
<i>Your space:{PAGEADD_ATTACH_LEFTSPACE} of {PAGEADD_ATTACH_TOTALSPACE} kB left, files not larger than {PAGEADD_ATTACH_MAXFILESIZE} kB.</i><br />

<!-- BEGIN: PAGEADD_ATTACH_ROW -->
<input type="text" name="{PAGEADD_ATTACH_ROW_CAPTION}" />
<input type="file" name="{PAGEADD_ATTACH_ROW_FILE}" /><br />
<!-- END: PAGEADD_ATTACH_ROW -->

<!-- END: PAGEADD_ATTACH -->

Tema dzenleme ilemleri bitmitir.

Dier ilemler.
datas/ ierisine attact adnda yeni bir kalsr oluturunuz yazma izni isterse 777 verin istemezse her hangi bir izin vermeyin.

Admin panel / Aralar / File Attachments tklayn alan sayfada install seneine tklayn sql yi otomatik import edicektir.

# Clean up (tm attach dosyalarn siler
# Show item details (dosya id nosunu yazdgnzda size dosyay detaylaryla gsterir)

Setup Blm Trke yapld nemli blmleri gerekli dzenlemeler yapld.

yi gnlerde Kullann.

Sitemize Destek Olmak iin GOOGLE reklamlarna tklamay unutmaynz ltfen..
www.seditio-eklenti.com
www.ntka.org

Her ey sizin iin..